package kr.hkit.powerjava.chapter11;
class Fly{
	String name;

	@Override
	public String toString() {
		return "비행기";
	}
	
	
}
public class Car {
	int speed;
	int gear;
	public String color;
	
	public void speedUp(int increment){
		speed += increment;		
	}
	public void spoodDown(int decrement){
		speed -= decrement;
	}
	@Override
	public String toString() {
		return String.format("Car [speed=%s, gear=%s, color=%s]", super.toString(), speed,gear,color);
	}

		public static void main(String[] args) {
			Car car = new Car();
			car.gear = 1;
			car.color = "red";
			car.speedUp(60);
			Car car2 = new Car();
			car2.gear = 2;
			car2.color = "blue";
			car2.speedUp(80);

			
			Fly fly = new Fly();
			fly.name = "fly01";
			Fly fly2 = new Fly();
			fly2.name = "fly01";
			
			Car[] arrCar =new Car[2];
			Fly[] arrfly = new Fly[2];
			
			prnArr(arrCar);
			prnArr(arrFly);
			
			
			
			 jjjjjjjjjjjjjjjjjjjjjj
			
			/*System.out.println(car);

			Object odj = car;
			System.out.println(odj.toString());
			
*///			Car car2 = new Object();
		}
		private static void prnArr(Car[] arrCar) {
			// TODO Auto-generated method stub
			
		}
}

